package org.vm.cmbcdirect.component.utils;

import org.vm.cmbcdirect.utils.BaseUtil;

import java.util.List;

/**
 * Created by violorch on 2016/3/25.
 */
public class StringRoleUtil {

    public static String joinString(List<String> words) {
        String result = "?api_key=" + BaseUtil.getFaceApiKey() + "&api_secret=" + BaseUtil.getFaceApiSecret();
        for (int i = 0; i < words.size(); i++) {
            if (i == 0) {
                result = result + words.get(0);
            }
            result = result + "&" + words.get(0);
        }
        return result;
    }


    public static String addArray(String[] target) {
        String result = "";
        for (int i = 0; i < target.length; i++) {
            if (i == 0) {
                result = result + target[i];
            }
            result = result + "," + target[i];
        }

        return result;
    }
}

